home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / C / Applications / Teapot / Teapot.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-11-18  |  1016 b   |  37 lines  |  [TEXT/KAHL]

  1. /* Title: Teapot.h
  2.  * Author: David Phillip Oster
  3.  * Synopsis: the declarations for TeaPot 3-D
  4.  * January 25, 1987 creation
  5.  */
  6. #define PATCHCOUNT 32    /* the number of surface patches */
  7.  
  8. #define ONE        ((Fixed) 0x10000L)        /* Fixed point representation of one */
  9. #define THREE    ((Fixed) 0x30000L)
  10. #define HALF    ((Fixed) 0x08000L)        /* Fixed point representation of 1/2 */
  11.  
  12.                                         /* the number of control points "ducks" */
  13. #define DUCKCOUNT 306
  14.  
  15.  
  16. /* patches is an array, length 32, of patch */
  17. /* patch is an array[0..3, 0..3] of int */
  18. typedef int Patch[4][4];
  19. typedef Point3D *Pt3dPtr;    /* a pointer to a 3d point */
  20. typedef struct {
  21.     float x, y, z;
  22. } FloatingPoint3D;
  23.  
  24. extern Patch patches[];
  25. extern FloatingPoint3D ducks[];
  26. extern Point3D Pt3ds[1+DUCKCOUNT];
  27.  
  28. extern int pitchVal, yawVal, rollVal, skewVal, viewVal, smoothVal;
  29.  
  30. void DisplayPatches(int);    /* draw the teapot */
  31. void OneEvent(void);        /* do a user event if any */
  32.  
  33. /* defined in teaGraf.c
  34.  */
  35. void FloatsToFixeds(register float *fl, Fixed *fi, int n);
  36.  
  37.